﻿using System;
using System.Windows.Forms;

namespace Moe.ECamel.Client.WinForms.Common
{
	public class ECamelComboBox : ComboBox
	{
		public void Bind(object dataSource, string dataMember, object listSource, string displayMember, string valueMember)
		{
			this.DisplayMember = displayMember;
			this.ValueMember = valueMember;
			this.DataSource = listSource;
			this.DataBindings.Add(new Binding("SelectedValue", dataSource, dataMember));
		}
	}
}
